package com.trust;


import java.sql.Time;

import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
public class TrustClass {
	@Id
	private String cookieHash;
	private String loginName;
	private Time timeStarted;
	private Time timeToEnd;
	
	public TrustClass(){}
	
	public TrustClass(String cookieHash, String loginName){
		this.cookieHash=cookieHash;
		this.loginName=loginName;
		Time timeToEnd = new Time(System.currentTimeMillis()+180000);
		Time timeStarted = new Time(System.currentTimeMillis());
		this.timeStarted=timeStarted;
		this.timeToEnd=timeToEnd;
		
	}
	
	public void setCookieHash(String cookieHash) {
		this.cookieHash = cookieHash;
	}
	public String getCookieHash() {
		return cookieHash;
	}
	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}
	public String getLoginName() {
		return loginName;
	}
	public void setTimeStarted(Time timeStarted) {
		this.timeStarted = timeStarted;
	}
	public Time getTimeStarted() {
		return timeStarted;
	}
	public void setTimeToEnd(Time timeToEnd) {
		this.timeToEnd = timeToEnd;
	}
	public Time getTimeToEnd() {
		return timeToEnd;
	}
	

	
}
